package com.itgaoshu.service.impl;

import com.itgaoshu.bean.Doctor;
import com.itgaoshu.mapper.DoctorMapper;
import com.itgaoshu.service.DoctorService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * 医生列表
 */
@Service
@Transactional
public class DoctorServiceImpl implements DoctorService {
    @Resource
    private DoctorMapper doctorMapper;
    //查询所有医生相对应的信息
    @Override
    public List<Doctor> selectAllDoctor() {
        return doctorMapper.selectAllDoctor();
    }
    //添加医生相对应的信息
    @Override
    public int addDoctor(Doctor doctor) {
        return doctorMapper.addDoctor(doctor);
    }
    //模糊查询医生相对应的信息
    @Override
    public List<Doctor> selectDoctor(Doctor doctor) {
        return doctorMapper.selectDoctor(doctor);
    }

    @Override
    //根据类型id回显医生的方法
    public List<Doctor> selectDoctorBYdepartmentid(int departmentid) {
        return doctorMapper.selectDoctorbydepartmentid(departmentid);
    }


}
